package 富婆梦.第一阶段.第二周.作业;

import java.util.LinkedList;

public class test1 {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        System.out.println(list);
        for (int j = 0;j<4;j++){
            for (int i = 0;i<list.size();i++){
                System.out.println(list.get(i));
            }
            list.addFirst(list.getLast());
            list.removeLast();
        }
    }

}
